summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNarr the Reg <juangerman-13@hotmail.com>2023-08-09 00:47:39 +0200
committerNarr the Reg <juangerman-13@hotmail.com>2023-08-09 00:52:21 +0200
commit6a43aff745e7b22b8d465a8f6c9e287206aff2f8 (patch)
tree2d7c5660e50468e815d923492b3fcb3c6fe63636
parentMerge pull request #11216 from lat9nq/no-mesa-astc (diff)
downloadyuzu-6a43aff745e7b22b8d465a8f6c9e287206aff2f8.tar
yuzu-6a43aff745e7b22b8d465a8f6c9e287206aff2f8.tar.gz
yuzu-6a43aff745e7b22b8d465a8f6c9e287206aff2f8.tar.bz2
yuzu-6a43aff745e7b22b8d465a8f6c9e287206aff2f8.tar.lz
yuzu-6a43aff745e7b22b8d465a8f6c9e287206aff2f8.tar.xz
yuzu-6a43aff745e7b22b8d465a8f6c9e287206aff2f8.tar.zst
yuzu-6a43aff745e7b22b8d465a8f6c9e287206aff2f8.zip
-rw-r--r--src/core/hle/service/pctl/pctl_module.cpp24
1 files changed, 15 insertions, 9 deletions
diff --git a/src/core/hle/service/pctl/pctl_module.cpp b/src/core/hle/service/pctl/pctl_module.cpp
index 7c8a539b8..5db1703d1 100644
--- a/src/core/hle/service/pctl/pctl_module.cpp
+++ b/src/core/hle/service/pctl/pctl_module.cpp
@@ -152,7 +152,7 @@ private:
if (pin_code[0] == '\0') {
return true;
}
- if (!restriction_settings.is_free_communication_default_on) {
+ if (!settings.is_free_communication_default_on) {
return true;
}
// TODO(ogniK): Check for blacklisted/exempted applications. Return false can happen here
@@ -168,21 +168,21 @@ private:
if (pin_code[0] == '\0') {
return true;
}
- if (!restriction_settings.is_stero_vision_restricted) {
+ if (!settings.is_stero_vision_restricted) {
return false;
}
return true;
}
void SetStereoVisionRestrictionImpl(bool is_restricted) {
- if (restriction_settings.disabled) {
+ if (settings.disabled) {
return;
}
if (pin_code[0] == '\0') {
return;
}
- restriction_settings.is_stero_vision_restricted = is_restricted;
+ settings.is_stero_vision_restricted = is_restricted;
}
void Initialize(HLERequestContext& ctx) {
@@ -430,7 +430,7 @@ private:
}
rb.Push(ResultSuccess);
- rb.Push(restriction_settings.is_stero_vision_restricted);
+ rb.Push(settings.is_stero_vision_restricted);
}
void ResetConfirmedStereoVisionPermission(HLERequestContext& ctx) {
@@ -460,22 +460,28 @@ private:
bool stereo_vision{};
};
- // This is nn::pctl::RestrictionSettings
- struct RestrictionSettings {
+ struct ParentalControlSettings {
bool is_stero_vision_restricted{};
bool is_free_communication_default_on{};
bool disabled{};
};
+
+ // This is nn::pctl::RestrictionSettings
+ struct RestrictionSettings {
+ u8 rating_age;
+ bool sns_post_restriction;
+ bool free_communication_restriction;
+ };
static_assert(sizeof(RestrictionSettings) == 0x3, "RestrictionSettings has incorrect size.");
// This is nn::pctl::PlayTimerSettings
struct PlayTimerSettings {
- // TODO: RE the actual contents of this struct
- std::array<u8, 0x34> settings;
+ std::array<u32, 13> settings;
};
static_assert(sizeof(PlayTimerSettings) == 0x34, "PlayTimerSettings has incorrect size.");
States states{};
+ ParentalControlSettings settings{};
RestrictionSettings restriction_settings{};
std::array<char, 8> pin_code{};
Capability capability{};